//
// Created by bjliuyong on 2021/7/13.
//

#ifndef JVM_CLASSFILEPARSER_H
#define JVM_CLASSFILEPARSER_H

#include "../oops/instanceKlass.h"
#include "classFileStream.h"

class ClassFileParser {
private:
    ClassFileStream *_stream;              // Actual input stream

    enum {
        LegalClass, LegalField, LegalMethod
    }; // used to verify unqualified names

    // Accessors
    ClassFileStream *stream() { return _stream; }

    void set_stream(ClassFileStream *st) { _stream = st; }

public:
    // Constructor
    ClassFileParser(ClassFileStream *st) { set_stream(st); }

    ~ClassFileParser();

    InstanceKlass* parseClassFile();

};

#endif //JVM_CLASSFILEPARSER_H
